package com.zhuiyi.yiqingbackend.domain;

import com.zhuiyi.yiqingbackend.domain.request.AddPatientRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Patient implements Serializable {
    private static final long serialVersionUID = 1L;
    private int id;
    private int baseid;
    private String critical;
    private String hospital;
    private String infectionSource;
    private String note;
    private Date onsetDate;
    private String symptoms;
    private int status;

    public Patient(AddPatientRequest addPatientRequest, int baseid) {
        this.baseid = baseid;
        this.critical = addPatientRequest.getCritical();
        this.hospital = addPatientRequest.getHospital();
        this.infectionSource = addPatientRequest.getInfectionSource();
        this.note = addPatientRequest.getNote();
        this.onsetDate = addPatientRequest.getOnsetDate();
        this.symptoms = addPatientRequest.getSymptoms();
    }

    public Patient(String hospital, Date onSetTime, String source, String symbol,int baseid) {
        this.hospital=hospital;
        this.onsetDate=onSetTime;
        this.infectionSource=source;
        this.symptoms=symbol;
        this.baseid=baseid;
    }
}
